<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c_rt="http://java.sun.com/jstl/core_rt"
	template="/resources/templates/formularioTemplate.xhtml"
	xmlns:rich="http://richfaces.org/rich">
	<ui:define name="pageTitle">
		Listado De Personas
	</ui:define>
	<ui:define name="body">
		<h:form>
			<rich:panel>
				<f:facet name="header">
					<h:outputText value="Listado De Personas" />
				</f:facet>
				<h:panelGrid columns="2">
					<h:commandButton action="crearPersona" value="Crear Persona" />
					<h:commandButton action="volver" value="Volver" />
				</h:panelGrid>
				<h:outputText escape="false" value="No hay datos que mostrar."
					rendered="#{personaController.items.rowCount == 0}" />
				<h:panelGroup rendered="#{personaController.items.rowCount > 0}">
					<h:outputText
						value="#{personaController.pagination.pageFirstItem + 1}..#{personaController.pagination.pageLastItem + 1}/#{personaController.pagination.itemsCount}" />
					<h:commandLink action="#{personaController.previous}"
						value="#{bundle.Previous} #{personaController.pagination.pageSize}"
						rendered="#{personaController.pagination.hasPreviousPage}" />
					<h:commandLink action="#{personaController.next}"
						value="#{bundle.Next} #{personaController.pagination.pageSize}"
						rendered="#{personaController.pagination.hasNextPage}" />
					<rich:extendedDataTable value="#{personaController.items}"
						var="persona" style="height:300px; width:100%;"
						selectionMode="none">
						<rich:column width="100px;">
							<f:facet name="header">
								<h:outputText value="Nombre Persona" />
							</f:facet>
							<h:outputText value="#{persona.nomPer}" />
						</rich:column>
						<rich:column width="100px;">
							<f:facet name="header">
								<h:outputText value="Apellido Persona" />
							</f:facet>
							<h:outputText value="#{persona.apePer}" />
						</rich:column>
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Fecha Nacimiento" />
							</f:facet>
							<h:outputText value="#{persona.fecNac}">
								<f:convertDateTime pattern="dd/MM/yyyy" />
							</h:outputText>
						</rich:column>
					</rich:extendedDataTable>
				</h:panelGroup>
			</rich:panel>
		</h:form>
	</ui:define>
</ui:composition>